home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98b.txt
/
000146_icon-group-sender _Tue Jul 28 16:33:27 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id QAA08147
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Tue, 28 Jul 1998 16:33:26 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA28615; Tue, 28 Jul 1998 16:33:09 -0700
From: dae_alt@juno.com
To: icon-group@optima.CS.Arizona.EDU
Date: Tue, 28 Jul 1998 14:32:18 PDT
Subject: Xcode puzzlement
Message-Id: <19980728.143221.2807.0.dae_alt@juno.com>
X-Mailer: Juno 1.49
X-Juno-Line-Breaks: 0-2,4-65
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Content-Length: 1483
To Icon user group:
I cannot figure this out.
Program 1 writes to disk and reads from disk the file 'xstore', which it
uses in xdecode().
Program 2 reads the same file as Program 1, but xdecode() fails.
(Run Program1 first, to create the disk file 'xstore')
Help!
#---------------------------------------------
#program1.icn
link xcode
record testit( a,b,c)
procedure main()
#write it
f := open("xstore","w")
x := testit()
x.a := "doug"
x.b := 34
x.c := "mardi gras"
xencode(x,f)
close(f)
#read it
g := open("xstore")
y := xdecode(g)
\y | stop("y is null")
close(g)
write(y.a)
write(y.b)
write(y.c)
end
#---------------------------------------------
#program2.icn
link xcode
record testit( a,b,c)
procedure main()
#write it
# f := open("xstore","w")
# x := testit()
# x.a := "doug"
# x.b := 34
# x.c := "mardi gras"
# xencode(x,f)
# close(f)
#read it
g := open("xstore")
y := xdecode(g)
\y | stop("y is null")
close(g)
write(y.a)
write(y.b)
write(y.c)
end
#-----------------------------------
I have no idea why xdecode() fails in program2.
The code is identical to that in program1
- Doug Edmunds -
edmunds@ethergate.com
--- END OF REAL MESSAGE ---
(Don't bother to read past here)
_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]